-- GENERATED SPELL FOR [Spectral Tutor] --


function spell0_10498(pUnit, Event) --@Image Projection,Self--
pUnit:FullCastSpellOnTarget(17651,pUnit)
pUnit:RegisterEvent('Sorts_10498', 6335, 1)
end

function spell1_10498(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(17630,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10498', 657, 1)
end

function spell2_10498(pUnit, Event) --@Silence,Self--
pUnit:FullCastSpellOnTarget(12528,pUnit)
pUnit:RegisterEvent('Sorts_10498', 11500, 1)
end

function Sorts_10498(pUnit, Event)
local choix_sorts_10498 = math.random(0, 2)
if choix_sorts_10498 == 0 then
pUnit:RegisterEvent('spell0_10498', 1, 1)
end
if choix_sorts_10498 == 1 then
pUnit:RegisterEvent('spell1_10498', 1, 1)
end
if choix_sorts_10498 == 2 then
pUnit:RegisterEvent('spell2_10498', 1, 1)
end
end

function mob10498_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10498', math.random(1500, 3000), 1)
end

function mob10498_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10498_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10498_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10498, 1, 'mob10498_Action')
RegisterUnitEvent(10498, 2, 'mob10498_Leave')
RegisterUnitEvent(10498, 3, 'mob10498_Kill')
RegisterUnitEvent(10498, 4, 'mob10498_Die')
